Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Directional Lights

QuickDraw 3D provides routines that you can use to create and edit directional lights.

Q3DirectionalLight_New

You can use the Q3DirectionalLight_New function to create a new directional light.

TQ3LightObject Q3DirectionalLight_New (
                                         const TQ3DirectionalLightData *directionalLightData);
directionalLightData
A pointer to a directional light data structure.

DESCRIPTION

The Q3DirectionalLight_New function returns, as its function result, a new directional light having the characteristics specified by the directionalLightData parameter.

Q3DirectionalLight_GetCastShadowsState

You can use the Q3DirectionalLight_GetCastShadowsState function to get the shadow-casting state of a directional light.

TQ3Status Q3DirectionalLight_GetCastShadowsState (
                     TQ3LightObject light,
                     TQ3Boolean *castsShadows);
light
A directional light object.
castsShadows
On exit, a Boolean value that indicates whether the specified light casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

DESCRIPTION

The Q3DirectionalLight_GetCastShadowsState function returns, in the castsShadows parameter, a Boolean value that indicates whether the light specified by the light parameter casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

Q3DirectionalLight_SetCastShadowsState

You can use the Q3DirectionalLight_SetCastShadowsState function to set the shadow-casting state of a directional light.

TQ3Status Q3DirectionalLight_SetCastShadowsState (
                     TQ3LightObject light,
                     TQ3Boolean castsShadows);
light
A directional light object.
castsShadows
A Boolean value that indicates whether the specified light casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

DESCRIPTION

The Q3DirectionalLight_SetCastShadowsState function sets the shadow-casting state of the directional light specified by the light parameter to the Boolean value specified in the castsShadows parameter.

Q3DirectionalLight_GetDirection

You can use the Q3DirectionalLight_GetDirection function to get the direction of a directional light.

TQ3Status Q3DirectionalLight_GetDirection (
                     TQ3LightObject light,
                     TQ3Vector3D *direction);
light
A directional light object.
direction
On exit, the direction of the specified light.

DESCRIPTION

The Q3DirectionalLight_GetDirection function returns, in the direction parameter, the current direction of the directional light specified by the light parameter.

Q3DirectionalLight_SetDirection

You can use the Q3DirectionalLight_SetDirection function to set the direction of a directional light.

TQ3Status Q3DirectionalLight_SetDirection (
                     TQ3LightObject light,
                     const TQ3Vector3D *direction);
light
A directional light object.
direction
The desired direction of the specified light.

DESCRIPTION

The Q3DirectionalLight_SetDirection function sets the direction of the directional light specified by the light parameter to the value passed in the direction parameter.

Q3DirectionalLight_GetData

You can use the Q3DirectionalLight_GetData function to get the data that defines a directional light.

TQ3Status Q3DirectionalLight_GetData (
                     TQ3LightObject light,
                     TQ3DirectionalLightData *directionalLightData);
light
A directional light object.
directionalLightData
On exit, a pointer to a directional light data structure.

DESCRIPTION

The Q3DirectionalLight_GetData function returns, through the directionalLightData parameter, information about the directional light specified by the light parameter. See "Directional Light Data Structure" for a description of a directional light data structure.

Q3DirectionalLight_SetData

You can use the Q3DirectionalLight_SetData function to set the data that defines a directional light.

TQ3Status Q3DirectionalLight_SetData (
                     TQ3LightObject light,
                     const TQ3DirectionalLightData *directionalLightData);
light
A directional light object.
directionalLightData
A pointer to a directional light data structure.

DESCRIPTION

The Q3DirectionalLight_SetData function sets the data associated with the directional light specified by the light parameter to the data specified by the directionalLightData parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |